package cn.juque.systemservice.api.dto.employee;

import cn.juque.common.abstracts.AbstractRequestDTO;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @author JUQUE
 * @version 1.0.0
 * <ul>
 *  <li>simple-generator</li>
 *  <li>员工信息</li>
 * </ul>
 * @date 2022-11-03 11:58:48
 **/
@Data
public class EmployeeInfoUpdateDTO extends AbstractRequestDTO {

    /**
     * 主键
     */
    @NotEmpty(message = "主键不能为空")
    @Size(message = "主键不能超过{max}个字符", max = 32)
    private String id;

    /**
     * 员工姓名
     */
    @NotEmpty(message = "员工姓名不能为空")
    @Size(message = "员工姓名不能超过{max}个字符", max = 16)
    private String employeeName;

    /**
     * 员工手机号，可用于登录
     */
    @NotEmpty(message = "员工手机号不能为空")
    @Size(message = "员工手机号不能超过{max}个字符", max = 11)
    private String employeeTel;

    /**
     * 头像
     */
    @Size(message = "头像不能超过{max}个字符", max = 512)
    private String headUrl;

    /**
     * 员工状态：1-待激活；2-已激活；3-禁用,
     */
    @NotNull(message = "员工状态不能为空")
    @Range(min = 0, max = 99, message = "员工状态必须在{min}-{max}之间")
    private Integer employeeStatus;

    /**
     * 邮箱号，可用于登录
     */
    @NotEmpty(message = "邮箱号不能为空")
    @Size(message = "邮箱号不能超过{max}个字符", max = 32)
    private String email;

    /**
     * 性别：-1-女士；0-未知；1-男士
     */
    @NotNull(message = "性别不能为空")
    @Range(min = -1, max = 9999, message = "性别必须在{min}-{max}之间")
    private Integer sex;

    /**
     * 机构列表
     */
    @NotEmpty(message = "所属机构不能为空")
    private List<String> orgIdList;

    /**
     * 角色列表
     */
    @NotEmpty(message = "所属角色不能为空")
    private List<String> roleIdList;
}
